SRC_DIR = $(PWD)/pkgs
DST_DIR = /tmp
PREFIX = $(DST_DIR)/install
export PKG_CONFIG_PATH = $(PREFIX)/lib/pkgconfig

VERBOSE ?= N
REMOVE ?= Y

ifneq ($(VERBOSE),Y)
V = @
endif

# Architecture dependent
include arch-arm926ej-s.mk

ifneq ($(HOST),)
CC  = $(HOST)-gcc
CXX = $(HOST)-g++
LD  = $(HOST)-ld
AR  = $(HOST)-ar
STRIP = $(HOST)-strip
else
STRIP = strip
endif

TIME = time -p

JOBS = 3

CPPFLAGS += -I$(PREFIX)/include
LDFLAGS += -L$(PREFIX)/lib

CONFIG += \
	--host=$(HOST) \
	--prefix=$(PREFIX) \
	CPPFLAGS="$(CPPFLAGS)" \
	CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)"\
	LDFLAGS="$(LDFLAGS)" \

include util.mk
include autoconfig.mk

# Search for *.mk & libraries
include $(wildcard $(SRC_DIR)/*.mk)
.PHONY: $(LIBS)

include rules.mk

# List all libraries
.DEFAULT_GOAL = list
